package Text27;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        StringBuffer stringBuffer = new StringBuffer();
        String str=in.nextLine();
        for (int i = 0; i < str.length(); i++) {
            if(i+1<str.length()&&str.charAt(i+1)<='9'){
                int k=str.charAt(i+1)-'0';
                while (k-->0){
                    stringBuffer.append(str.charAt(i));
                }
                i++;
            }else{
                stringBuffer.append(str.charAt(i));
            }
        }
        System.out.println(stringBuffer);
    }
}
